package com.solcoo.controller;

import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.solcoo.service.RecommendService;

@Controller
public class RecommendController {
	@Resource
	private RecommendService recommendService;
	
	// 推荐，recommended为推荐人的用户名，rdtype为客户端类型（个人版客户端调用传入"2"，商户版传入"1"，配送员版传入"3"），
	// apptype为推荐的app类型（推荐个人版传入"2"……默认为"2"）
	@RequestMapping(value="addRecommend.do")
	public @ResponseBody Map<String, Object> addRecommend(String telephone, String recommended,
			String rdtype, String apptype) throws Exception {
		return recommendService.addRecommend(telephone, recommended, rdtype, apptype);
	}
}